package com.fxp.project.jiuselu.web.business.v1.controller.withdrawal;


import com.fxp.project.jiuselu.web.base.controller.BaseController;
import com.fxp.project.jiuselu.web.domain.CommonResult;
import com.fxp.project.jiuselu.web.models.userbank.qo.BankCardSaveQo;
import com.fxp.project.jiuselu.web.models.withdrawal.qo.ApplyWithdrawalQo;
import com.fxp.project.jiuselu.web.models.withdrawal.service.IJslUserWithdrawalRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户提现记录表 前端控制器
 * </p>
 *
 * @author Jason.Wang
 * @since 2022-01-09
 */
@RestController
@RequestMapping("/v1/withdrawal")
public class JslUserWithdrawalRecordController extends BaseController {

    @Autowired
    private IJslUserWithdrawalRecordService iJslUserWithdrawalRecordService ;


    @PostMapping("/applyWithdrawal")
    @CrossOrigin
    public CommonResult applyWithdrawal(@RequestBody @Validated ApplyWithdrawalQo applyWithdrawalQo) throws Exception {
        iJslUserWithdrawalRecordService.applyWithdrawal(applyWithdrawalQo,super.getCurrentUserInfo().getUserId());
        return CommonResult.success("保存成功");
    }
}
